package com.xnyzc.lhy.common.penum.work;

/**
 * @Description 工单外呼类型
 * @Author wangshuo
 * @Date 2019-11-04 14:06
 **/
public enum EWorkOutboundType {

    driver(0, "司机"),
    passenger(1, "乘客"),
    feedbackPeople(3, "反馈人");

    private Integer type;
    private String desc;

    EWorkOutboundType(Integer type, String desc){
        this.type = type;
        this.desc = desc;
    }

    public static EWorkOutboundType findById(Integer type) {
        EWorkOutboundType eWorkType;
        switch (type) {
            case 0:
                eWorkType = EWorkOutboundType.driver;
                break;
            case 1:
                eWorkType = EWorkOutboundType.passenger;
                break;
            case 3:
                eWorkType = EWorkOutboundType.feedbackPeople;
                break;
            default:
                throw new IllegalArgumentException("非法type");
        }
        return eWorkType;
    }

    public Integer getType() {
        return this.type;
    }

    public String getDesc() {
        return this.desc;
    }
}
